Fix error suppression from r63209.
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 30 Jun 2010 05:30:29 +0000 (05:30 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 30 Jun 2010 05:30:29 +0000 (05:30 +0000)
includes/installer/Installer.php

index 405f72d..8a3ab4e 100644 (file)
@@ -881,7 +881,13 @@ abstract class Installer {
        }
 
        public function installSecretKey() {
-               $file = wfIsWindows() ? null : @fopen( "/dev/urandom", "r" );
+               if ( wfIsWindows() ) {
+                       $file = null;
+               } else {
+                       wfSuppressWarnings();
+                       $file = fopen( "/dev/urandom", "r" );
+                       wfRestoreWarnings();
+               }
                if ( $file ) {
                        $secretKey = bin2hex( fread( $file, 32 ) );
                        fclose( $file );